enum Day {
  SUNDAY = 0,
  MONDAY,
  TUESDAY
}

console.log(Day.MONDAY, Day.TUESDAY)

enum MyDay {
  Monday,
  Tuesday = Day.TUESDAY
}

console.log(MyDay.Tuesday)
// let day: MyDay.Tuesday = MyDay.Tuesday // TS2535
let day2: Day.MONDAY = 9 // day2类型为Day.MONDAY
let day3 = MyDay.Monday // day3类型为MyDay

declare enum SomeDay {
  Sunday,
  Monday
}

console.log(SomeDay.Sunday)